package Thread;
//wait方法的使用
public class ThreadDemo11 {
    public static void main(String[] args) throws InterruptedException {
        Object object=new Object();
        synchronized(object){
            System.out.println("wait之前");
            object.wait();
            System.out.println("wait之后");
        }
        synchronized (object){
            object.notify();
        }
    }
}
